package JZOffer;


import javax.xml.stream.events.EntityReference;

public class ErWeiShuZuChaZhao {
    class Solution {
        public boolean Find(int target, int[][] array) {
            for (int i = 0; i < array.length; i++) {
                for (int j = 0; j < array[i].length; j++) {
                    if (array[i][j] > target) {
                        continue;
                    }
                    if (array[i][j] == target) {
                        return true;
                    }
                }
            }
            return false;
        }
    }

    Solution getSolution(){
        return new Solution();
    }

    public static void main(String args[]) {
        ErWeiShuZuChaZhao c = new ErWeiShuZuChaZhao();
        ErWeiShuZuChaZhao.Solution s = c.getSolution();
        int[][] arr = {
                {1,3,4},
                {2,5,6},
                {4,6,7}
        };
        System.out.println(s.Find(10,arr));
    }
}
